import Vue from 'vue'

import 'normalize.css/normalize.css' // a modern alternative to CSS resets

import Element from 'element-ui'
import './assets/styles/element-variables.scss'

import '@/assets/styles/index.scss' // global css

import echarts from 'echarts'

import App from './App'
import store from './store'
import router from './router'

import './assets/icons' // icon
import './permission' // permission control

import GlobalSearch from './components/GlobalSearch/index.vue' // GlobalSearch
import Pagination from './components/Pagination/index.vue' // Pagination

import Filter from './utils/global'
import Directives from './directives/global'

/**
 * If you don't want to use mock-server
 * you want to use MockJs for mock api
 * you can execute: mockXHR()1
 *
 * Currently MockJs will be used in the production environment,
 * please remove it before going online ! ! !
 */

Vue.component('global-search', GlobalSearch)
Vue.component('pagination', Pagination)
Vue.use(Element, {
    size: 'mini' // set element-ui default size
})

Vue.config.productionTip = false
Vue.prototype.$echarts = echarts

Vue.use(Filter)
Vue.use(Directives)

/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    store,
    render: h => h(App)
})
